﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Media;
using System.Windows.Data;
using ArmyCreator.ViewModels;

namespace ArmyCreator.Controls
{
    public partial class OptionIconControl : UserControl
    {
        private VisualStates state = VisualStates.HiddenState;
        public enum VisualStates { VisibleState, HiddenState }

        public string Label { get; set; }

        public Uri Icon { get; set; }

        public OptionIconControl()
        {
            InitializeComponent();
            Icon = new Uri("/Assets/icones/weapon.png", UriKind.Relative);
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            Label = ((OptionViewModel)DataContext).Name;

            if (Label.Equals("Armure Scout", StringComparison.CurrentCultureIgnoreCase))
                Icon = new Uri("/Assets/icones/save_4.png", UriKind.Relative);

            DataContext = this;
        }


    }
}
